<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>我的主页</title>
</head>
<body>
  <p>测试效果</p>
<button onclick="test()">开启任务</button>
</body>
</html>
<script>
  const {  ipcRenderer } = require('electron')
function test  (){
  console.log("test");
  // 渲染进程 TO 主进程  生产端
  ipcRenderer.send('wake:task')

}


</script>